using Newtonsoft.Json;

namespace KL.Standard.Model.Infrastructure;

/// <summary>
/// 返回json的结构 
/// </summary>
/// <typeparam name="T"></typeparam>
public class BaseResult<T>
{
    /// <summary>
    /// true 成功 false 失败
    /// </summary>
    public bool success { set; get; }
    /// <summary>
    /// 返回信息
    /// </summary>
    public string error { set; get; }
    /// <summary>
    /// 错误编码
    /// </summary>
    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string errCode { set; get; }
    /// <summary>
    /// 数据对象
    /// </summary>
    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public T data { set; get; }
}